package com.yoomiito.app.adapter.my


import android.graphics.Color
import android.text.TextUtils
import android.widget.ImageView
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.yoomiito.app.R
import com.yoomiito.app.model.bean.MyTeamSaleInfo
import com.yoomiito.app.model.my.ApplyInfo
import com.yoomiito.app.model.my.IncomeInfo
import com.yoomiito.app.utils.ImageLoader

class MyTeamSaleAdapter : BaseQuickAdapter<MyTeamSaleInfo, BaseViewHolder>(R.layout.item_my_team) {
    override fun convert(helper: BaseViewHolder, item: MyTeamSaleInfo) {
        helper.setText(R.id.item_goods_order_id, "订单：" + item.id)
        val goodsPicIv = helper.getView<ImageView>(R.id.item_goods_order_pic)
        ImageLoader.getInstance()
            .into(goodsPicIv.context, item.banner, goodsPicIv, R.drawable.goods_default)
        val goodsTitleTv = helper.getView<TextView>(R.id.item_goods_order_title)
        goodsTitleTv.text = item.productName
        val mobile = helper.getView<TextView>(R.id.item_mobile)
        mobile.text = "手机号码: "+item.mobile
        val pay = helper.getView<TextView>(R.id.item_pay)
        helper.setText(R.id.item_goods_order_date, item.ctime)
        helper.setText(R.id.item_goods_order_price, "¥" + item.price);
        helper.setText(R.id.item_goods_order_num, "×" + item.nums)
        helper.setText(R.id.item_pay_price, "¥" + item.money)
    }
}
